﻿@{
    Layout = null;
}
@using MvcMall.Framework.Helpers;
@using MvcMall.AdminPortal.Controllers.System.ViewModels;
@model List<MvcMall.AdminPortal.Controllers.System.ViewModels.AdminModulModel>
<!DOCTYPE html>
<html>
<head>
    <title>Index</title>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/base/jquery-ui.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#mainframe").load(function () {
                var mainheight = $(this).contents().find("body").height() + 30;
                if (mainheight > 800)
                    $(this).height(mainheight);
            });

            $('.menu_div a').click(function (ev) {
                $('.menu_div a.selected').removeClass('selected');
                $(this).addClass('selected');
            });

            $("#leftMenu").accordion();
        });

    </script>
</head>
<body style="">
    <div class="page">
        <div id="header">
            <div id="logo">
                <img src="../../Content/themes/base/images/title.jpg" />
            </div>
            @Html.Partial("HeaderUserControl")
        </div>
        <div id="main">
            <table width="100%" cellpadding="0" style="border: none;" cellspacing="0" border="0">
                <tr>
                    <td style="width: 200px; border: none; background-color: #E8F3F9; border-right: solid 1px #e8eef4;
                        vertical-align: top">
                        <div id="leftMenu">
                            @foreach (AdminModulModel modul in Model)
                            {
                                <h3>
                                    <a href="#">@modul.ModulName</a></h3>
                                <div class="menu_div">
                                    <ul>
                                        @foreach (var item in modul.ChildMenus)
                                        {
                                            <li>@Html.ActionLink(item.MenuName, item.ActionName, item.ControllerName, null, new { @target = "mainframe" })</li>
                                        }
                                    </ul>
                                </div>
                            }
                        </div>
                    </td>
                    <td style="border: none; vertical-align: top;">
                        <iframe id="mainframe" name="mainframe" frameborder="0" height="800px" src="/System/Welcome"
                            scrolling="no" width="100%"></iframe>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</body>
</html>
